package com.gxkj.projects.myshopx.dao;

import com.gxkj.common.hibernate.HibernateBaseRepositoryImpl;
import com.gxkj.projects.myshopx.entitys.GoodsAttr;
import com.gxkj.projects.myshopx.enums.CategoryState;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public class GoodsAttrDaoImpl extends HibernateBaseRepositoryImpl {

    /**
     * 按照商品id查询列表
     * @param goodsId
     * @return
     */
    public List<GoodsAttr> selectGoodsAttrByGoodsId(String goodsId){
        String hql  = " from GoodsAttr g  where goodsId  = :goodsId  ";
        Map<String,Object> param = new HashMap<String,Object>();
        param.put("goodsId", goodsId);
        return this.selectListByHQL(hql,param);
    }


}
